package com.jsmy.marketing.adapter;

import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.jsmy.marketing.bean.AppZLGroupBean;

import java.util.List;


/**
 * Created by PC_WLT on 2018/8/17.
 */

public class FzAdapter extends BaseAdapter {

    private Context mContext;
    private List<AppZLGroupBean.DataBean.ListBean> mList;
    public FzAdapter(Context context, List<AppZLGroupBean.DataBean.ListBean> list) {
        mContext=context;
        mList=list;
    }

    @Override
    public int getCount() {
        return mList.size();
    }

    @Override
    public AppZLGroupBean.DataBean.ListBean getItem(int position) {
        return mList.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        TextView textView=new TextView(mContext);
        textView.setText(getItem(position).getMc());
        textView.setPadding(10,10,10,10);
        textView.setGravity(Gravity.CENTER);
        return textView;
    }
}
